import Movie from '../pages/movie'
import Mine from '../pages/mine'
import Cinema from '../pages/cinema'
import MovieNowHot from '../pages/movie/MovieNowHot.vue'
import MovieComingHot from '../pages/movie/MovieComingHot.vue'
import Error from '../pages/error'

const routes =[
    {
     path:'',  //给一个路由重定向
     redirect:'/movie'
    },
    {
        path:'/movie',//给一个路径的地址。
        component: Movie,
        children:[
            { 
                path:'n.hot',   //注意子路由不需要写单斜杠的
              component:MovieNowHot
           },
            { 
                path:'f.hot',
               component:MovieComingHot
          }
        ]       
    },
    {
          path:'/mine',
          component:Mine
    },
    {
        path:'/cinema',
        component:Cinema
    },
    {
        path:'/error',
        component:Error
    },
    {
        path:'**',//代表其他的地址就自动判断错误，
        redirect:'/error'
    }
]

export default routes